<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">

	<head>

		<%@ include file="/WEB-INF/include/meta.jsp"%>
		<%@ include file="/WEB-INF/include/css.jsp"%>

	</head>

	<body class="x-theme-draft">

		<%@ include file="/WEB-INF/include/header.jsp"%>
		<%@ include file="/WEB-INF/include/submenu.jsp"%>

		<div class="container-fluid x-container has-x-sidemenu">

			<ol class="x-breadcrumb breadcrumb">
				<li class="active">挑战审核&nbsp;&nbsp;-&nbsp;&nbsp;详情</li>
			</ol>

			<div class="x-content-layout ">

				<div class="form-horizontal x-form">
					<div class="block-heading">
						<h5>详情信息</h5>
					</div>

					<div class="form-group x-form-group">
						<label class="control-label col-xs-2" style="width: 12%">用户昵称：</label>
						<div class="col-xs-3">
							<p class="form-control-static">${userBet.user.nickname}</p>
						</div>
						<label class="control-label col-xs-2" style="width: 12%">手机：</label>
						<div class="col-xs-3">
							<p class="form-control-static">
								${userBet.user.mobile}
							</p>
						</div>
					</div>
					
					<div class="form-group x-form-group">
						<label class="control-label col-xs-2" style="width: 12%">赌局名称：</label>
						<div class="col-xs-3">
							<p class="form-control-static">${userBet.bet.name}</p>
						</div>
						<label class="control-label col-xs-2" style="width: 12%">参与时间：</label>
						<div class="col-xs-3">
							<p class="form-control-static">
								<fmt:formatDate value="${userBet.createTime}" pattern="yyyy-MM-dd" />
							</p>
						</div>
					</div>

					<div class="form-group x-form-group">
						<label class="control-label col-xs-2" style="width: 12%">挑战前：</label>
						<div class="col-xs-3">
							<p class="form-control-static">
								<c:if test="${not empty userBet.beforeWeight}">
									${userBet.beforeWeight}&nbsp;KG <br />
									<a target="_BLANK" href="${userBet.beforeVedio}">${userBet.beforeVedio}</a>
								</c:if>
								<c:if test="${empty userBet.beforeWeight}">
									暂未上传
								</c:if>
							</p>
						</div>

						<label class="control-label col-xs-2" style="width: 12%">挑战后：</label>
						<div class="col-xs-3">
							<p class="form-control-static">
								<c:if test="${not empty userBet.afterWeight}">
									${userBet.afterWeight}&nbsp;KG <br />
									<a target="_BLANK" href="${userBet.afterVedio}">${userBet.afterVedio}</a>
								</c:if>
								<c:if test="${empty userBet.afterWeight}">
									暂未上传
								</c:if>
							</p>
						</div>
					</div>

					<div class="form-group x-form-group">
						<label class="control-label col-xs-2" style="width: 12%">看好人数：</label>
						<div class="col-xs-3">
							<p class="form-control-static">
								${userBet.thumbup}
							</p>
						</div>

						<label class="control-label col-xs-2" style="width: 12%">不看好人数：</label>
						<div class="col-xs-3">
							<p class="form-control-static">
								${userBet.thumbdown}
							</p>
						</div>
					</div>

					<div class="form-group x-form-group">

					</div>

					<div class="form-group x-form-group">
						<label class="control-label col-xs-2" style="width: 12%">状态：</label>
						<div class="col-xs-3">
							<p class="form-control-static">
								${userBet.status.description}
							</p>
						</div>
						
					</div>

					<div class="block-heading" style="margin-top: 50px;">
						<h5>投注者列表</h5>
					</div>

					<table class="table table-hover x-table">
						<thead>
							<tr>
								<th>序号</th>
								<th>名称</th>
								<th>手机</th>
								<th>投注金额</th>
								<th>状态</th>
								<th>是否看好</th>
								<th>参与时间</th>

							</tr>
						</thead>
						<tbody>
							<c:forEach items="${userBetSupport}" var="userBetSupport" varStatus="status">
								<tr>
									<td>${status.index+1}</td>
									<td>${userBetSupport.user.nickname}</td>
									<td>${userBetSupport.user.mobile}</td>

									<td>
										${userBetSupport.price/100}
									</td>
									<td>${userBetSupport.status.alias}</td>
									<td>
										${userBetSupport.support ? '看好':'不看好'}
									</td>

									<td>
										<fmt:formatDate value="${userBetSupport.createDtae}" pattern="yyyy-MM-dd" />
									</td>
								</tr>
							</c:forEach>

						</tbody>

					</table>

				</div>
			</div>
		</div>

		<%@ include file="/WEB-INF/include/script.jsp"%>
		<d:resource type="script" root="${ctx.resource}/build" src="js/page/order/order-view.js" />
		<script type="text/javascript">
			require(['page/order/order-view'], function(page) {
				page.init()
			})
		</script>

	</body>

</html>